<template>
  <div class="wrapper">
    <swiper class="swiper" :options="swiperOption">
      <!-- slides -->
      <swiper-slide v-for="item in imageList" :key="item.id">
        <img class="swiper-img" :src="item.imgurl">
      </swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
  export default {
    name: 'HomeSwiper',
    data () {
      return {
        swiperOption: {
//          自动播放
          pagination: '.swiper-pagination'
        },
        imageList: [
          {
            id: '1',
            imgurl: 'http://img1.qunarzz.com/piao/fusion/1805/77/f63bd04dd5319602.jpg_750x200_6ba8e0ca.jpg'
          },
          {
            id: '2',
            imgurl: 'http://img1.qunarzz.com/piao/fusion/1805/e6/33ce6413c5949f02.jpg_750x200_004a9ea4.jpg'
          }
        ]
      }
    }
  }
</script>

<style lang="stylus" scoped>
  .wrapper >>> .swiper-pagination-bullet-active
    background: white
  .wrapper
    overflow :hidden
    width :100%
    height :0
    padding-bottom : 26.6%
    background :#eee
  .swiper-img
    width :100%

</style>
